package hfs

func (s *httpFileServerImpl) AddMapping(virtualDir, physicalPath string) {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	s.mappings[virtualDir] = physicalPath
}

func (s *httpFileServerImpl) RemoveMapping(virtualDir string) {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	delete(s.mappings, virtualDir)
}

func (s *httpFileServerImpl) SetMappings(mappings map[string]string) {
	if mappings == nil {
		mappings = make(map[string]string)
	}
	s.mutex.Lock()
	s.mappings = mappings
	s.mutex.Unlock()
}
